package com.shangke.springbootkkyp.serview;

import com.shangke.springbootkkyp.pojo.Admin;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
@Service
public interface AdminSerview {
    /**
     * 新增收货地址
     * @param admin
     * @return
     */
    Integer adminaAdd(Admin admin);

    /**
     * 删除收货地址
     * @param adminId
     * @param xxl_sso_sessionid
     * @return
     */
    Boolean adminDelete(Long adminId,String xxl_sso_sessionid );

    /**
     * 修改收货地址
     * @param id map xxlSsoSessionid
     * @return
     */
    Boolean adminEdit(Long id, HashMap<String, String> hashMap, String xxlSsoSessionid);

    /**
     * 收货地址详情
     * @param adminId
     * @param xxl_sso_sessionid
     * @return
     */
    Admin adminGet(Long adminId,String xxl_sso_sessionid);

    /**
     * 设置默认地址
     * @param adminId
     * @param xxl_sso_sessionid
     * @return
     */
    Boolean truePriority(Long adminId, String xxl_sso_sessionid);

    /**
     * 设置为不是默认地址
     * @param adminId
     * @param xxl_sso_sessionid
     * @return
     */
    Boolean flasePriority(Long adminId, String xxl_sso_sessionid);

    /**
     * 获取默认收货地址
     * @param xxl_sso_sessionid
     * @return
     */
    Admin priorityGet(String xxl_sso_sessionid);

    /**
     * 获得收货地址列表
     * @param page
     * @param xxl_sso_sessionid
     * @return
     */
    List<Admin> get(Integer page,String xxl_sso_sessionid);
}
